#ifndef __HAL_OS_H
#define __HAL_OS_H

#include "config.h"
#include "board.h"
#include "rtthread.h"
typedef enum  {
    HAL_OS_OK           = 0,    /* success */
    HAL_OS_FAIL         = -1,   /* general failure */
    HAL_OS_E_NOMEM      = -2,   /* out of memory */
    HAL_OS_E_PARAM      = -3,   /* invalid parameter */
    HAL_OS_E_TIMEOUT    = -4,   /* operation timeout */
    HAL_OS_E_ISR        = -5,   /* not allowed in ISR context */
}hal_os_status_t;

#define HAL_OS_ASSERT(test)                                                                   \
    do                                                                                        \
    {                                                                                         \
        if (!(test))                                                                          \
        {                                                                                     \
            while (1)                                                                         \
            {                                                                                 \
                /*LUAT_DEBUG_PRINT("feitian_os_assert %s %d\r\n", __FUNCTION__, __LINE__); */ \
                /*BSJ_ThreadSleep(1000); */                                                   \
            }                                                                                 \
        }                                                                                     \
    } while (0)
#endif/*__HAL_OS_H*/


typedef enum {
    HAL_OS_PRIORITY_IDLE         = 1,
    HAL_OS_PRIORITY_LOW          = 8,
    HAL_OS_PRIORITY_BELOW_NORMAL = 16,
    HAL_OS_PRIORITY_NORMAL       = 24,
    HAL_OS_PRIORITY_ABOVE_NORMAL = 32,
    HAL_OS_PRIORITY_HIGH         = 100,
    HAL_OS_PRIORITY_REAL_TIME    = 48,
} hal_os_priority_t;





